///////////////////////////////////////////////////////////////////////////////
///
/// Cylan Client Core
/// Copyright (C) Shenzhen Cylan Tech. Co., Ltd. 2012
///
/// @file       ICAB.h
/// @brief      ICAB应用虚拟化API
///
///////////////////////////////////////////////////////////////////////////////
#ifndef CYLAN_ICAB_H
#define CYLAN_ICAB_H

#if defined(__cplusplus)
extern "C" 
{
#endif

#include "Core/Core.h"
#include "ICAB/ICABControl.h"
#include "ICAB/ICABChannel.h"
#include "ICAB/ICABResource.h"
#include "ICAB/ICABScancode.h"

#if defined(__linux__)
#include <linux/limits.h>
#elif defined(IPHONE)
#include <sys/syslimits.h>
#elif defined(_WIN32)
#define PATH_MAX 512
#endif

///////////////////////////////////////////////////////////////////////////////
/**
 * @typedef ICABFN_BEGINPAINT
 * @brief 开始绘图回调函数
 */
typedef void (* ICABFN_BEGINPAINT)(CHANDLE ICAB, void *UIContext);

/**
 * @typedef ICABFN_INVALIDATE
 * @brief 重绘区域回调函数
 */
typedef void (* ICABFN_INVALIDATE)(CHANDLE ICAB, void *UIContext, int x, int y, int width, int height);

/**
 * @typedef ICABFN_ENDPAINT
 * @brief 结束绘图回调函数
 */
typedef void (* ICABFN_ENDPAINT)(CHANDLE ICAB, void *UIContext);

/**
 * @typedef ICABFN_LOGON_SUCCESSFUL
 * @brief ICAB会话登陆成功回调
 */
typedef void (* ICABFN_LOGON_SUCCESSFUL)(CHANDLE ICAB);

/**
 * @typedef ICABFN_LOGON_ERROR
 * @brief ICAB会话登陆失败回调
 */
typedef void (* ICABFN_LOGON_ERROR)(CHANDLE ICAB, int Data, int Type);
    
/**
 * typedef ICAB_OPTION_PAINT_CALLBACK
 * @brief  ICAB绘图配置
 */
typedef struct ICAB_OPTION_PAINT_CALLBACK
{
    void *UIContext;                        ///< 调用者设置的上下文参数
    ICABFN_BEGINPAINT BeginPaint;           ///< 开始绘图通知
    ICABFN_INVALIDATE Invalidate;           ///< 重绘区域通知
    ICABFN_ENDPAINT EndPaint;               ///< 结束绘图通知
} ICAB_OPTION_PAINT_CALLBACK;

/**
 * @struct ICAB_DISPLAY_METRICS_TYPE
 * @brief  SGA配置分辨率方式
 */
typedef enum ICAB_DISPLAY_METRICS_TYPE
{
    ICAB_DISPLAY_METRICS_NONE = 0,            ///< 未初始化
    ICAB_DISPLAY_METRICS_FULLSCREEN,          ///< 设置为全屏
    ICAB_DISPLAY_METRICS_VALUE                ///< 取值方式配置
}ICAB_DISPLAY_METRICS_TYPE;

/**
 * typedef ICAB_DISPLAY_METRICS
 * @brief  ICAB分辨率
 */
typedef struct ICAB_DISPLAY_METRICS
{
    ICAB_DISPLAY_METRICS_TYPE type;         ///< if = ICAB_DISPLAY_METRICS_VALUE, GetValue
                                            ///< else GetDisplayMetrics
    int Width;                              ///< 宽度
    int Height;                             ///< 高度
} ICAB_DISPLAY_METRICS;

///////////////////////////////////////////////////////////////////////////////
/**
 * @typedef ICABFN_NEWPOINTER
 * @brief 设置光标
 */
typedef void (* ICABFN_SETPOINTER)(CHANDLE ICAB, int x, int y, int width, int height, void *cursor, int bpp);


///////////////////////////////////////////////////////////////////////////////
#define ICABOPT_SCREEN_FLAG_WIDTH           0x00000001
#define ICABOPT_SCREEN_FLAG_HEIGHT          0x00000002
#define ICABOPT_SCREEN_FLAG_BPP             0x00000004
#define ICABOPT_SCREEN_FLAG_CLIENTWIDTH     0x00000010
#define ICABOPT_SCREEN_FLAG_CLIENTHEIGHT    0x00000020

#define ICABOPT_SCREEN_FLAG_REMOTE          (ICABOPT_SCREEN_FLAG_WIDTH  | \
                                            ICABOPT_SCREEN_FLAG_HEIGHT  | \
                                            ICABOPT_SCREEN_FLAG_BPP)

#define ICABOPT_SCREEN_FLAG_LOCAL           (ICABOPT_SCREEN_FLAG_CLIENTWIDTH | \
                                            ICABOPT_SCREEN_FLAG_CLIENTHEIGHT)

/**
 * @typedef ICAB_OPTION_SCREEN_PARAMETER
 * @brief  用于建立连接前设置ICAB屏幕分辨率参数
 */
typedef struct ICAB_OPTION_SCREEN_PARAMETER
{
    int Width;                              ///< 客户端建议连接宽度
    int Height;                             ///< 客户端建议连接高度
    int BitsPerPixel;                       ///< 屏幕色深
	int ScreenWidth;						///< 屏幕像素宽度
	int ScreenHeight;						///< 屏幕像素高度
    int Flags;                              ///< 参数有效位
    ICAB_DISPLAY_METRICS_TYPE DisplayMode;  ///< 客户端是否设置为全屏幕
} ICAB_OPTION_SCREEN_PARAMETER;

///////////////////////////////////////////////////////////////////////////////
/**
 * @typedef ICAB_INFO_SCREEN
 * @brief  用于查询连接后ICAB的实际屏幕参数以及绘图Buffer指针
 */
typedef struct ICAB_INFO_SCREEN
{
    int Width;                              ///< 屏幕像素宽度
    int Height;                             ///< 屏幕像素高度
    int BitsPerPixel;                       ///< 屏幕色深
    void *ScreenBuffer;                     ///< 屏幕缓冲区
} ICAB_INFO_SCREEN;

///////////////////////////////////////////////////////////////////////////////
/**
 * @def ICAB_COLOR_ALPHA
 * @brief 指示带有Alpha通道
 */
#define ICAB_COLOR_ALPHA        1

/**
 * @def ICAB_COLOR_INVERT
 * @brief 将RGB改为BGR格式
 */
#define ICAB_COLOR_INVERT       2

/**
 * @def ICAB_COLOR_555
 * @brief 配合ICAB_COLOR_16BPP使用, 将565格式改为555格式
 */
#define ICAB_COLOR_555          4

/**
 * @def ICAB_COLOR_16BPP
 * @brief 使用16位色的Offscreen位图(2Bpp, RGB:565)
 */
#define ICAB_COLOR_16BPP        8

/**
 * @def ICAB_COLOR_24BPP
 * @brief 使用24位色的Offscreen位图(3Bpp, RGB:888)
 */
#define ICAB_COLOR_24BPP        16

/**
 * @def ICAB_COLOR_32BPP
 * @brief 使用32位色的Offscreen位图(4Bpp, ARGB:8888)
 */
#define ICAB_COLOR_32BPP        32

/**
 * @def ICAB_DRIVE_MAX_COUNT
 * @brief 虚拟盘个数
 */
 #define ICAB_DRIVE_MAX_COUNT         10

/** 
 * @typedef ICABFN_CREATE_SCREEN
 * @param ICAB ICAB句柄
 * @param ScreenBuffer 上层分配的屏幕缓冲区返回指针
 * @param Flags 调用者指定的ICAB_COLOR参数
 * @param Width 屏幕宽度
 * @param Height 屏幕高度
 * @param BitsPerPixel 屏幕色深
 * @brief 创建Offscreen位图回调函数
 */
typedef void (* ICABFN_CREATE_SCREEN)(CHANDLE ICAB,
                                      void *ScreenContext,
                                      void **ScreenBuffer,
                                      unsigned int *Flags,
                                      int Width,
                                      int Height,
                                      int BitsPerPixel);

/**
 * @typedef ICABFN_DESTROY_SCREEN
 * @param ICAB ICAB句柄
 * @param ScreenBuffer 上层分配的屏幕缓冲区返回指针
 * @brief 释放Offscreen位图回调函数
 */
typedef void (* ICABFN_DESTROY_SCREEN)(CHANDLE ICAB,
                                       void *ScreenContext,
                                       void *ScreenBuffer);


/**
 * @typedef ICAB_OPTION_SCREEN_CALLBACK
 * @brief  ICAB绘图回调
 */
typedef struct ICAB_OPTION_SCREEN_CALLBACK
{
    void *ScreenContext;                    ///< 调用者自己保存的回调参考参数
    ICABFN_CREATE_SCREEN CreateScreen;      ///< 创建屏幕缓冲通知
    ICABFN_DESTROY_SCREEN DestroyScreen;    ///< 释放屏幕缓冲通知
} ICAB_OPTION_SCREEN_CALLBACK;

/**
 * @typedef ICAB_OPTION_PSTCACHE
 * @brief  ICAB PSTCACHE OPTION
 */
typedef struct ICAB_OPTION_PSTCACHE
{
    int PSTCacheOn;                 ///< Turn PSTCache On or Off
    char PSTCacheDir[PATH_MAX];            ///< PSTCache File Dir
} ICAB_OPTION_PSTCACHE;

///////////////////////////////////////////////////////////////////////////////
/**
 * @enum ICAB_OPTION_TYPE
 * @brief ICAB可配置参数
 */
typedef enum ICAB_OPTION_TYPE
{
    ICABOptionUserData,                     ///< 设置用户自定义数据: void *
	ICABOptionRemoteFX,						///< 设置是否启用RemoteFX: int
	ICABOptionSeamless,						///< 设置是否启用Seamless: int
    ICABOptionPluginUSB,					///< 启用USB重定向, 无参数
	ICABOptionPluginSound,					///< 启用声音重定向, 无参数

	/**
		加载自定义通道插件, value为char *类型的插件dll路径, size忽略.
		此参数仅在连接前设置有效, 一旦加载无法取消		
	*/
	ICABOptionPluginStaticChannel,

	/**
		设置持久缓存目录, value为char *类型的缓存目录路径, size忽略.
		如果传入的value非NULL, 则启用持久缓存特性
		如果传入的value为NULL, 则取消持久缓存特性
		此参数仅在连接前设置有效, 连接后取消会导致崩溃
	*/
	ICABOptionPersistCacheDir,

    ICABOptionLossyCompress,                ///< 设置有损压缩, 非NULL生效
    ICABOptionLogonSuccessCallback,         ///< 登陆成功回调函数
    ICABOptionLogonErrorCallback,           ///< 登陆失败回调函数

    //ICABOptionClientScreenWidth,            ///< 设置客户端屏幕宽度: int
    //ICABOptionClientScreenHeight,           ///< 设置客户端屏幕高度: int
    ICABOptionDeprecated,                   ///< 保留
    ICABOptionPaintCallback,                ///< 设置 ICAB_OPTION_PAINT_CALLBACK
    ICABOptionScreenCallback,               ///< 设置 ICAB_OPTION_SCREEN_CALLBACK
    ICABOptionChannelCallback,              ///< 设置 ICAB_OPTION_CHANNEL_CALLBACK
    ICABOptionRMUSBChannelCallback,         ///< 设置 ICAB_OPTION_RMUSBCHANNEL_CALLBACK
    ICABOptionScreenParameter,              ///< 设置 ICAB_OPTION_SCREEN_PARAMETER
    ICABOptionPointerCallback,              ///< 设置 ICABOptionPoint
    ICABOptionPSTCacheParameter,             ///< 设置持久缓存参数  
    ICABOptionPluginDrive
} ICAB_OPTION_TYPE;

///////////////////////////////////////////////////////////////////////////////
/**
 * @enum ICAB_INFO_TYPE
 * @brief ICAB可查询信息
 */
typedef enum ICAB_INFO_TYPE
{
    ICABInfoPaintCallback,                  ///< 查询 ICAB_OPTION_PAINT_CALLBACK
    ICABInfoScreenCallback,                 ///< 查询 ICAB_OPTION_SCREEN_CALLBACK
    ICABInfoChannelCallback,                ///< 查询 ICAB_OPTION_CHANNEL_CALLBACK
    ICABInfoScreen,                         ///< 查询 ICAB_INFO_SCREEN
    ICABInfoResourceID,                     ///< 查询 ICAB 的资源ID (int *)
    ICABInfoUserData,                       ///< 查询用户自定义数据 (void *)
    ICABInfoCoreInstance = 0xFFFFFFFF       ///< 保留
} ICAB_INFO_TYPE;


typedef struct ICAB_RDPDR_DRIVE_INFO
{
    char Name[50];
	char Path[255];
}ICAB_RDPDR_DRIVE_INFO;

typedef struct ICAB_OPTION_RDPDR_DRIVE
{
    int DriveCount;
	ICAB_RDPDR_DRIVE_INFO ICABDriveList[ICAB_DRIVE_MAX_COUNT];
}ICAB_OPTION_RDPDR_DRIVE;

///////////////////////////////////////////////////////////////////////////////
/**
 * @fn CHANDLE ICABNew(CHANDLE Session)
 * @brief 创建一个ICAB对象
 * @param Session 已登陆的Session句柄
 * @return ICAB句柄
 */
CHANDLE ICABNew(CHANDLE Session);


/**
 * @fn CC_STATUS ICABConnect(CHANDLE ICAB, int ResId)
 * @brief 连接ICAB资源
 * @param ICAB 新创建的ICAB句柄
 * @param ResId 资源ID
 * @retval ERR_SUCCESS 连接成功
 * @retval ERR_NOT_FOUND ICAB资源不存在
 * @retval ERR_NETWORK_DNS 无法解析域名错误
 * @retval ERR_NETWORK_CONNECT 无法连接服务器错误
 * @retval ERR_ICAB_UNDEFINED ICAB连接未知失败
 * @retval ERR_ICAB_MCS ICAB连接MCS初始化失败
 * @retval ERR_ICAB_TLS ICAB连接TLS协商失败
 * @retval ERR_ICAB_AUTH ICAB连接认证失败
 * @retval ERR_ICAB_CONFIG ICAB配置有误, 检查SGA配置
 */
CC_STATUS ICABConnect(CHANDLE ICAB, int ResId);


/**
 * @fn CC_STATUS ICABConnectIBOX(CHANDLE ICAB)
 * @brief 连接IBOX专用ICAB服务器
 * @param ICAB 新创建的ICAB句柄
 * @retval ERR_IBOX_CONFIG IBOX配置有误, 检查SGA配置
 * @retval 其他类似错误参考ICABConnect的返回值
 * @see ICABConnect
 */
CC_STATUS ICABConnectIBOX(CHANDLE ICAB);



/**
 * @fn CC_STATUS ICABDisconnect(CHANDLE ICAB)
 * @brief 断开ICAB连接
 * @param ICAB 将要断开的ICAB句柄
 */
CC_STATUS ICABDisconnect(CHANDLE ICAB);


/**
 * @fn CC_STATUS ICABSetOption(CHANDLE ICAB, ICAB_OPTION_TYPE Option, const void * const Value, int Size)
 * @brief 设置ICAB配置
 * @param ICAB ICAB句柄
 * @param Option 配置类型
 * @param Value 配置参数, 传NULL代表清除该配置, Size将会忽略
 * @param Size 配置参数大小
 * @retval ERR_SUCCESS 设置成功
 */
CC_STATUS ICABSetOption(CHANDLE ICAB, ICAB_OPTION_TYPE Option, const void * const Value, int Size);


/**
 * @fn CC_STATUS ICABQueryInfo(CHANDLE ICAB, ICAB_INFO_TYPE InfoType, void * Value, int * Size)
 * @brief 获取ICAB配置
 * @param ICAB ICAB句柄
 * @param ConfigClass 配置类别
 * @param Value 配置参数保存的缓冲区
 * @param Size 缓冲区大小
 * @retval ERR_SUCCESS 获取成功
 */
CC_STATUS ICABQueryInfo(CHANDLE ICAB, ICAB_INFO_TYPE InfoType, void * Value, int * Size);


/**
 * @fn CC_STATUS ICABProcessOnce(CHANDLE ICAB)
 * @brief 处理一次ICAB网络层通讯消息, 如果没有消息将会在Timeout毫秒后返回
 * @param ICAB ICAB句柄
 * @param Timeout 等候时间, 不可为负数
 * @retval ERR_SUCCESS 调用者主动断开
 * @retval ERR_ICAB_DISCONNECT 服务端正常断开
 * @retval ERR_UNSUCCESS 服务端非正常断开. 使用ICABGetErrorCode获取错误码
 * @see ICABGetErrorCode
 */
CC_STATUS ICABProcessOnce(CHANDLE ICAB, int Timeout);


/**
 * @fn CC_STATUS ICABProcess(CHANDLE ICAB)
 * @brief 处理ICAB网络层通讯消息, 阻塞直到服务端断开或客户端调用ICABDisconnect
 * @param ICAB ICAB句柄
 * @retval ERR_SUCCESS 调用者主动断开
 * @retval ERR_UNSUCCESS 服务端断开. 使用ICABGetErrorCode获取错误码
 * @see ICABGetErrorCode
 */
CC_STATUS ICABProcess(CHANDLE ICAB);



/**
 * @fn CC_STATUS ICABCouldLaunchResource(CHANDLE ICAB, int ResourceID)
 * @brief 判断在某个ICAB会话是否可以复用以启动资源ResourceID.
 *        用户点击ICAB资源的时候, 应首先使用该函数判断是否能够在已经连接的ICAB会话打开应用
 *        如果可以, 则调用ICABChannelRequestLaunch启动该资源
 *        否则, 应该重新以该ResourceID创建ICAB连接再启动资源.
 * @param ICAB ICAB句柄
 * @param ResourceID 资源ID
 * @retval ERR_SUCCESS 可以使用该会话启动ResourceID资源
 * @retval ERR_UNSUCCESS 不可以使用该ICAB会话启动ResourceID资源
 * @see ICABChannelRequestLaunch
 */
CC_STATUS ICABCouldLaunchResource(CHANDLE ICAB, int ResourceID);


/**
 * @fn CC_STATUS ICABLaunchResourceQuery(CHANDLE ICAB, int ResourceID, ICAB_OPTION_SCREEN_PARAMETER *ScreenInfo)
 * @brief 判断在某个ICAB会话是否可以复用以启动资源ResourceID.
 *        用户点击ICAB资源的时候, 应首先使用该函数判断是否能够在已经连接的ICAB会话打开应用
 *        如果可以, 则调用ICABChannelRequestLaunch启动该资源
 *        否则, 应该重新以该ResourceID创建ICAB连接再启动资源.
 * @param ICAB ICAB句柄
 * @param ScreenInfo 将要建立连接的屏幕参数Width，Height，BitsPerPixel必须填写
 * @param ResourceID 资源ID
 * @retval ERR_SUCCESS 可以使用该会话启动ResourceID资源
 * @retval ERR_UNSUCCESS 不可以使用该ICAB会话启动ResourceID资源
 * @see ICABCouldLaunchResource
 */
CC_STATUS ICABLaunchResourceQuery(CHANDLE ICAB, int ResourceID, ICAB_OPTION_SCREEN_PARAMETER *ScreenInfo);


/**
 * @fn unsigned char *ICABSetScreenBuffer(CHANDLE ICAB, unsigned char *Buffer)
 * @brief 设置ICAB绘图缓冲
 * @param[in] ICAB ICAB句柄
 * @param[in] Buffer 绘图缓冲, 传递NULL则停止绘图.
 * @return 当前Buffer指针
 * @note 可以用于ICAB前后台切换时, 重新分配绘图缓冲以节省运行内存.
 * @warning 传递的Buffer大小应与ScreenCallback返回的长宽以及色深匹配, 否则程序会发生致命错误
 */
unsigned char *ICABSetScreenBuffer(CHANDLE ICAB, unsigned char *Buffer);


/**
 * @fn CC_STATUS ICABGetErrorCode(CHANDLE ICAB)
 * @brief 获取ICAB错误码
 * @param ICAB ICAB句柄
 */
int ICABGetErrorCode(CHANDLE ICAB);


/**
 * @fn const char *ICABGetErrorString(int ErrorCode)
 * @brief 获取ICAB错误码描述
 * @param ErrorCode 从ICABGetErrorCode获取的错误码
 * @see ICABGetErrorCode
 */
const char *ICABGetErrorString(int ErrorCode);

/**
 * @fn CC_STATUS ICABFindCABInfoByHostAndIndex(void *Session,void *Buffer,int *Index,int *Size, void *HostName)
 * @brief 获取IBOX主机对应可用的ICAB资源
 * @param Session 已登陆的Session句柄
 * @param Buffer 调用者准备的缓冲区
 * @param Index 一个主机对应多个ICAB资源，index就是需要返回的ICAB资源的索引
 * @param Size 客户准备的缓冲区大小，如果太小，则返回需要大小
 * @param HostName 主机名称
 * @retval ERR_SUCCESS 获取成功
 */
CC_STATUS ICABFindCABInfoByHostAndIndex(void *Session,
                              void *Buffer,
                              int *Index,
                              int *Size,
                              void *HostName);
                              
/**
 * @fn CC_STATUS ICABFindCABInfoByHostIPAndIndex(void *Session,void *Buffer,int *Index,int *Size, void *HostIP)
 * @brief 获取IBOX主机对应可用的ICAB资源
 * @param Session 已登陆的Session句柄
 * @param Buffer 调用者准备的缓冲区
 * @param Index 一个主机对应多个ICAB资源，index就是需要返回的ICAB资源的索引
 * @param Size 客户准备的缓冲区大小，如果太小，则返回需要大小
 * @param HostIP 主机IP
 * @retval ERR_SUCCESS 获取成功
 */                              
CC_STATUS ICABFindCABInfoByHostIPAndIndex(void *Session,
                              void *Buffer,
                              int Index,
                              int *Size,
                              void *HostIP);    
                              

/**
 * @fn CC_STATUS ICABFindCABInfoByHostIPAndIndex(void *Session, int Index, void *HostIP)
 * @brief 根据IP获取主机对应可用的ICAB资源
 * @param Session 已登陆的Session句柄
 * @param Index 一个IP可能对应多个ICAB资源，index就是需要返回的ICAB资源的索引,一般为0
 * @param HostIP 主机IP
 * @retval 非0获取成功
 */                               
int ICABFindResourceIDbyHostIP(void *Session,
                              int Index,
                              const char *HostIP);


CC_STATUS ICABFindAppInfoAndHostInfo(void *vSession,
        int ResId,
        void *vResInfo,
        void *vHostInfo);
                              
/**
 * @fn void ICABCopyPixelBuffer(CHANDLE ICAB,UIN8*dstBuffer,int x,int y,int width, int height);
 * @brief 从底层绘图buffer 复制 位图数据
 * @param ICAB ICAB句柄
 * @param DstBuffer 目标地址
 * @param x 复制起始x坐标
 * @param y 复制起始y坐标
 * @param width 长度
 * @param height 宽度
 */                            
void ICABCopyPixelBuffer(CHANDLE ICAB, unsigned char* DstBuffer, int x, int y, int width, int height);

/**
 * @fn void ICABGetResourceNumber(void *Session);
 * @brief 返回资源数量
 * @param Session 登陆会话
 * @retval int 资源数量
 */    
int ICABGetResourceNumber(void *Session);

/**
 * @fn void ICABGetSGADisplayMetricsForICAB( void *Session, int nResID, ICAB_DISPLAY_METRICS *DisplayMetics);
 * @brief 返回SGA设置的屏幕分辨率信息
 * @param Session 登陆会话
 * @param int nResID 资源ID
 * @param ICAB_DISPLAY_METRICS DisplayMetics分辨率信息
 * @retval ERR_SUCCESS 获取成功 
 */    
CC_STATUS ICABGetSGADisplayMetricsForICAB( void *Session, int nResID, ICAB_DISPLAY_METRICS *DisplayMetics);

/**
 * @fn void ICABEnableRemoteFX(CHANDLE ICAB, int Enabled)
 * @brief 连接设置启用RemoteFx
 * @param ICAB ICAB句柄
 * @param Enabled 非0,启用RemoteFX; 0,关闭RemoteFx
 */                            
void ICABEnableRemoteFX(CHANDLE ICAB, int Enabled);

/**
 * @fn void ICABDumpStatics( CHANDLE ICAB );
 * @brief 打印统计信息
 * @param ICAB ICAB Handle
 */    
void ICABDumpStatics(CHANDLE ICAB);

/**
 * @fn void ICABTotalBytes( CHANDLE ICAB );
 * @brief 获取到目前为止的流量计数,单位是字节
 * @param ICAB ICAB Handle
 */    
unsigned long ICABTotalBytes(CHANDLE ICAB);

CC_STATUS ICABWaitForMultipleEvents(CHANDLE ICAB, int Timeout);
CC_STATUS ICABProcessEventsNetwork(CHANDLE ICAB);
CC_STATUS ICABProcessEventsInput(CHANDLE ICAB);
CC_STATUS ICABProcessEventsUpdate(CHANDLE ICAB);

#if defined(__cplusplus)
};
#endif
#endif /* CYLAN_ICAB_H */

